class CreateFaqs < ActiveRecord::Migration[7.1]
  def change
    create_table :faqs do |t|
      t.string :question
      t.text :answer

      t.vector :embedding, limit: 1024

      t.timestamps
    end
    add_index :faqs, :embedding, using: :hnsw, opclass: :vector_cosine_ops
  end
end
